
export const getFields = () => {
    return [
        {
            type: 'input', prop: 'username', label: '姓名',showWordLimit: true, maxLength: 20, rules: [
                {
                    required: true,
                    message: '姓名必填',
                    trigger: 'blur',
                }
            ]
        },
        {
            type: 'select', prop: 'jh', label: '是否已婚',options: [{ label: '是', value: 1 }, { label: '否', value: 0 }], rules: [
                {
                    required: true,
                    message: '必填',
                    trigger: 'change',
                }
            ]
        },
        {
            type: 'remoteSelect', prop: 'yc', label: '远程搜素',
            remoteApi: (val: string, formData: any) => {
                return new Promise((resolve) => {
                    setTimeout(() => {
                        console.log(val)
                        resolve([
                            { label: '城市1', value: 1 },
                            { label: '城市2', value: 2 },
                            { label: '城市3', value: 3 },
                            { label: '城市4', value: 4 }
                        ] as any)
                    }, 1000);
                })
            }, rules: [
                {
                    required: true,
                    message: '必填',
                    trigger: 'change',
                }]
        },
        {
            type: 'date', prop: 'date', label: '今天之前不可选', dateMinLimit: '2023-12-06', rules: [
                {
                    required: true,
                    message: '必填',
                    trigger: 'blur',
                }]
        },
        {
            type: 'date', prop: 'stateTime', label: '开始时间', dateMaxLimit: 'endTime', rules: [
                {
                    required: true,
                    message: '必填',
                    trigger: 'blur',
                }]
        },
        {
            type: 'date', prop: 'endTime', label: '结束时间', dateMinLimit: 'stateTime', rules: [
                {
                    required: true,
                    message: '必填',
                    trigger: 'blur',
                }]
        },
        {
            type: 'checkbox', prop: 'jn', label: '技能', options: [{ label: 'react', value: 1 }, { label: 'vue2', value: 0 }, { label: 'vue3', value: 3 }], rules: [
                {
                    required: true,
                    message: '必填',
                    trigger: 'blur',
                }]
        },
        {
            type: 'radio', prop: 'sex', label: '性别', options: [{ label: '男', value: 1 }, { label: '女', value: 0 }], rules: [
                {
                    required: true,
                    message: '必填',
                    trigger: 'blur',
                }]
        },
        {
            type: 'switch', prop: 'switch', label: '开关', activeValue: 1, inactiveValue: 2, activeText: '开启', inactiveText: '关闭', rules: [
                {
                    required: true,
                    message: '必填',
                    trigger: 'blur',
                }]
        },
        { type: 'textarea', prop: 'des', label: '简介', showWordLimit: true, maxLength: 200, autosize: { minRows: 6, maxRows: 8 } }
    ]
}